package com.dragon.www.smarthome.net;

import com.dragon.www.smarthome.net.inter.ISocketPacket;

import java.io.IOException;
import java.net.DatagramPacket;

/**
 * Created by Administrator on 2015/10/28 16:08.
 * Author: songxy
 * Email: thinkdata@163.com
 */
public interface ASocketPacket extends ISocketPacket {
	/**
	 * 校验值
	 * @return
	 */
	void checksum();
	/**
	 *  序列化输出对象
	 * @return
	 */
	void writeExternal(DatagramPacket output) throws IOException;
	/**
	 * 序列化输入对象
	 * @param input
	 * @throws IOException
	 * @throws ClassNotFoundException
	 */
	void readExternal(DatagramPacket input) throws IOException, ClassNotFoundException;
}
